# == Schema Information
#
# Table name: design_case_attachments
#
#  id             :integer          not null, primary key
#  image          :string
#  design_case_id :integer
#  created_at     :datetime         not null
#  updated_at     :datetime         not null
#

class DesignCaseAttachment < ApplicationRecord

  belongs_to :design_case

  validates :image, presence: { message: "图片不能为空" }
  validates :design_case_id, presence: { message: "案例不能为空" }

  mount_base64_uploader :image, DesignCaseAttachmentUploader

end
